/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sh.ndt.course.mapper;

import com.sh.ndt.common.mapper.BaseRowMapper;
import com.sh.ndt.course.entity.Course;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author Prashanth
 */
public class CourseMapper extends BaseRowMapper{

    @Override
    public Object mapRow(ResultSet rs, int i) throws SQLException {

        Course course = new Course();
        
        course.setCourseId(rs.getLong("course_id"));
        course.setCourseFee(rs.getDouble("course_fee"));
        course.setCourseName(rs.getString("course_name"));
        course.setCourseDesc(rs.getString("course_desc"));
        
        return course;
    }
    
}
